package com.lyf.convert_x.strategy.dateStrategy;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * @program: com.lyf.convert_x.strategy.dateStrategy
 * @description:
 * @author: GG-lyf
 * @create: 2024/10/29
 */
public class NowDateTimeConverter  implements DateConverterStrategy{
    @Override
    public String execute(String msg) {
        LocalDateTime now = LocalDateTime.now();
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        return now.format(formatter);
    }
}
